Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle protocol agnostic URI with domain in canonical link #345

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

OliverFriedrich
Copy link
Contributor

@OliverFriedrich OliverFriedrich commented Nov 19, 2018

Currently Shariff expands canonical URI read from og:url or canonical link tag with protocol and domain, if it doesn't find a leading "http" in the URI.

Example on domain test.com:
"/index.html" expands to "http://test.com/index.html"

This behavior produces invalid results if the URI has two leading slashes (a protocol agnostic URI with domain) as it expands "//test.com/index.html" on domain test.com to "http://test.com//test.com/index.html"

The pull request fixes this, as only the protocol will be added in such cases.

…t to always add protocol and domain if protocol is missing
@compeak compeak self-assigned this Jan 22, 2019
@compeak compeak merged commit 6e097f0 into heiseonline:develop Jan 22, 2019
@compeak
Copy link
Collaborator

compeak commented Jan 22, 2019

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants